/*
 * XML Type:  basic
 * Namespace: http://java.sun.com/xml/ns/persistence/orm
 * Java type: com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Basic
 *
 * Automatically generated - do not modify.
 */
package com.googlecode.horncomb.orm.jpa.v10.xmlbeans.impl;
/**
 * An XML basic(@http://java.sun.com/xml/ns/persistence/orm).
 *
 * This is a complex type.
 */
public class BasicImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Basic
{
    
    /**  */
	private static final long serialVersionUID = 5850418185053353070L;


	public BasicImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName COLUMN$0 = 
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "column");
    private static final javax.xml.namespace.QName LOB$2 = 
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "lob");
    private static final javax.xml.namespace.QName TEMPORAL$4 = 
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "temporal");
    private static final javax.xml.namespace.QName ENUMERATED$6 = 
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "enumerated");
    private static final javax.xml.namespace.QName NAME$8 = 
        new javax.xml.namespace.QName("", "name");
    private static final javax.xml.namespace.QName FETCH$10 = 
        new javax.xml.namespace.QName("", "fetch");
    private static final javax.xml.namespace.QName OPTIONAL$12 = 
        new javax.xml.namespace.QName("", "optional");
    
    
    /**
     * Gets the "column" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Column getColumn()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Column target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Column)get_store().find_element_user(COLUMN$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "column" element
     */
    public boolean isSetColumn()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(COLUMN$0) != 0;
        }
    }
    
    /**
     * Sets the "column" element
     */
    public void setColumn(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Column column)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Column target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Column)get_store().find_element_user(COLUMN$0, 0);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Column)get_store().add_element_user(COLUMN$0);
            }
            target.set(column);
        }
    }
    
    /**
     * Appends and returns a new empty "column" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Column addNewColumn()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Column target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Column)get_store().add_element_user(COLUMN$0);
            return target;
        }
    }
    
    /**
     * Unsets the "column" element
     */
    public void unsetColumn()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(COLUMN$0, 0);
        }
    }
    
    /**
     * Gets the "lob" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Lob getLob()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Lob target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Lob)get_store().find_element_user(LOB$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "lob" element
     */
    public boolean isSetLob()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(LOB$2) != 0;
        }
    }
    
    /**
     * Sets the "lob" element
     */
    public void setLob(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Lob lob)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Lob target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Lob)get_store().find_element_user(LOB$2, 0);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Lob)get_store().add_element_user(LOB$2);
            }
            target.set(lob);
        }
    }
    
    /**
     * Appends and returns a new empty "lob" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Lob addNewLob()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Lob target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Lob)get_store().add_element_user(LOB$2);
            return target;
        }
    }
    
    /**
     * Unsets the "lob" element
     */
    public void unsetLob()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(LOB$2, 0);
        }
    }
    
    /**
     * Gets the "temporal" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.TemporalType.Enum getTemporal()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TEMPORAL$4, 0);
            if (target == null)
            {
                return null;
            }
            return (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.TemporalType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "temporal" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Temporal xgetTemporal()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Temporal target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Temporal)get_store().find_element_user(TEMPORAL$4, 0);
            return target;
        }
    }
    
    /**
     * True if has "temporal" element
     */
    public boolean isSetTemporal()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(TEMPORAL$4) != 0;
        }
    }
    
    /**
     * Sets the "temporal" element
     */
    public void setTemporal(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.TemporalType.Enum temporal)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TEMPORAL$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TEMPORAL$4);
            }
            target.setEnumValue(temporal);
        }
    }
    
    /**
     * Sets (as xml) the "temporal" element
     */
    public void xsetTemporal(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Temporal temporal)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Temporal target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Temporal)get_store().find_element_user(TEMPORAL$4, 0);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Temporal)get_store().add_element_user(TEMPORAL$4);
            }
            target.set(temporal);
        }
    }
    
    /**
     * Unsets the "temporal" element
     */
    public void unsetTemporal()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(TEMPORAL$4, 0);
        }
    }
    
    /**
     * Gets the "enumerated" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EnumType.Enum getEnumerated()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ENUMERATED$6, 0);
            if (target == null)
            {
                return null;
            }
            return (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EnumType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "enumerated" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Enumerated xgetEnumerated()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Enumerated target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Enumerated)get_store().find_element_user(ENUMERATED$6, 0);
            return target;
        }
    }
    
    /**
     * True if has "enumerated" element
     */
    public boolean isSetEnumerated()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ENUMERATED$6) != 0;
        }
    }
    
    /**
     * Sets the "enumerated" element
     */
    public void setEnumerated(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EnumType.Enum enumerated)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ENUMERATED$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ENUMERATED$6);
            }
            target.setEnumValue(enumerated);
        }
    }
    
    /**
     * Sets (as xml) the "enumerated" element
     */
    public void xsetEnumerated(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Enumerated enumerated)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Enumerated target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Enumerated)get_store().find_element_user(ENUMERATED$6, 0);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Enumerated)get_store().add_element_user(ENUMERATED$6);
            }
            target.set(enumerated);
        }
    }
    
    /**
     * Unsets the "enumerated" element
     */
    public void unsetEnumerated()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ENUMERATED$6, 0);
        }
    }
    
    /**
     * Gets the "name" attribute
     */
    public java.lang.String getName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$8);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "name" attribute
     */
    public org.apache.xmlbeans.XmlString xgetName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$8);
            return target;
        }
    }
    
    /**
     * Sets the "name" attribute
     */
    public void setName(java.lang.String name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$8);
            }
            target.setStringValue(name);
        }
    }
    
    /**
     * Sets (as xml) the "name" attribute
     */
    public void xsetName(org.apache.xmlbeans.XmlString name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NAME$8);
            }
            target.set(name);
        }
    }
    
    /**
     * Gets the "fetch" attribute
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType.Enum getFetch()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(FETCH$10);
            if (target == null)
            {
                return null;
            }
            return (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "fetch" attribute
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType xgetFetch()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType)get_store().find_attribute_user(FETCH$10);
            return target;
        }
    }
    
    /**
     * True if has "fetch" attribute
     */
    public boolean isSetFetch()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(FETCH$10) != null;
        }
    }
    
    /**
     * Sets the "fetch" attribute
     */
    public void setFetch(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType.Enum fetch)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(FETCH$10);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(FETCH$10);
            }
            target.setEnumValue(fetch);
        }
    }
    
    /**
     * Sets (as xml) the "fetch" attribute
     */
    public void xsetFetch(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType fetch)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType)get_store().find_attribute_user(FETCH$10);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType)get_store().add_attribute_user(FETCH$10);
            }
            target.set(fetch);
        }
    }
    
    /**
     * Unsets the "fetch" attribute
     */
    public void unsetFetch()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(FETCH$10);
        }
    }
    
    /**
     * Gets the "optional" attribute
     */
    public boolean getOptional()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(OPTIONAL$12);
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "optional" attribute
     */
    public org.apache.xmlbeans.XmlBoolean xgetOptional()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(OPTIONAL$12);
            return target;
        }
    }
    
    /**
     * True if has "optional" attribute
     */
    public boolean isSetOptional()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(OPTIONAL$12) != null;
        }
    }
    
    /**
     * Sets the "optional" attribute
     */
    public void setOptional(boolean optional)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(OPTIONAL$12);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(OPTIONAL$12);
            }
            target.setBooleanValue(optional);
        }
    }
    
    /**
     * Sets (as xml) the "optional" attribute
     */
    public void xsetOptional(org.apache.xmlbeans.XmlBoolean optional)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(OPTIONAL$12);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlBoolean)get_store().add_attribute_user(OPTIONAL$12);
            }
            target.set(optional);
        }
    }
    
    /**
     * Unsets the "optional" attribute
     */
    public void unsetOptional()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(OPTIONAL$12);
        }
    }
}
